package cn.hznc.vo;

import cn.hznc.domain.entity.ToolDemandForecastReportProductEntity;
import cn.hznc.domain.entity.ToolDemandForecastReportToolEntity;
import cn.hznc.utils.factory.ExcelExportStrategy;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @Author：Administrator
 * @Date：2023/11/20 15:24
 */
@Getter
@Setter
public class OrderForecastReportExport implements ExcelExportStrategy{

   private ToolDemandForecastReportProductEntity toolDemandForecastReportProductEntity;

   private List<ToolDemandForecastReportToolEntity> toolForecastReportToolExportList;

   @Override
   public ExcelWriter buildExcelWrite(ExcelWriter excelWriter, FillConfig fillConfig, WriteSheet writeSheet) {
      excelWriter.fill(this.toolDemandForecastReportProductEntity, fillConfig, writeSheet);
      excelWriter.fill(this.toolForecastReportToolExportList, writeSheet);
      return excelWriter;
   }
}
